package net.zjitc.securityrolepermission.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 罗翼侨
 * @date 2025/3/9 15:29
 */
@RestController
public class ClueController {

    @RequestMapping(value = "/api/clue/index")
    public String clueIndex() {
        return "clueIndex";
    }
    @PreAuthorize("hasRole('saler')")
    @RequestMapping(value = "/api/clue/menu")
    public String clueMenu() {
        return "clueMenu";
    }
    @PreAuthorize("hasRole('saler')")
    @RequestMapping(value = "/api/clue/menu/child")
    public String clueMenuChild() {
        return "clueMenuChild";
    }
    @PreAuthorize("hasRole('saler')")
    @RequestMapping(value = "/api/clue/list")
    public String clueList() {
        return "clueList";
    }
    @PreAuthorize("hasRole('saler')")
    @RequestMapping(value = "/api/clue/input")
    public String clueInput() {
        return "clueInput";
    }
    @PreAuthorize("hasRole('saler')")
    @RequestMapping(value = "/api/clue/edit")
    public String clueEdit() {
        return "clueEdit";
    }
    @PreAuthorize("hasRole('saler')")
    @RequestMapping(value = "/api/clue/view")
    public String clueView() {
        return "clueView";
    }
    @PreAuthorize("hasRole('admin')")
    @RequestMapping(value = "/api/clue/del")
    public String clueDel() {
        return "clueDel";
    }
    @PreAuthorize("hasAnyRole('admin','manager')")
    @RequestMapping(value = "/api/clue/export")
    public String clueExport() {
        return "clueExport";
    }
}
